package io.ken.im.common.domain.model;

/**
 * @author: ken
 * @description: 即时通讯服务 消息回推结果模型
 * @date 2023-12-12
 **/
public class IMSendResult<T> extends TopicMessage {
    private static final long serialVersionUID = 2695132890639720740L;

    /**
     * 消息发送人
     */
    private IMUserInfo sender;

    /**
     * 消息接收者
     */
    private IMUserInfo receiver;

    /**
     * 消息接收状态, IMSendCode枚举值
     */
    private Integer code;

    /**
     * 消息内容
     */
    private T data;

    public IMSendResult() {
    }

    public IMSendResult(IMUserInfo sender, IMUserInfo receiver, Integer code, T data) {
        this.sender = sender;
        this.receiver = receiver;
        this.code = code;
        this.data = data;
    }

    public IMUserInfo getSender() {
        return sender;
    }

    public void setSender(IMUserInfo sender) {
        this.sender = sender;
    }

    public IMUserInfo getReceiver() {
        return receiver;
    }

    public void setReceiver(IMUserInfo receiver) {
        this.receiver = receiver;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
